import React, { Component } from 'react'
import './index.css'

export default class LifeTest extends Component {

  state = {
    msg: 'abc'
  }

  render() {
    
    const {msg} = this.state
    const {count} = this.props

    return (
      <div className="life-test">
        <h2>LifeTest</h2>
        <p>state.msg: {msg}</p>
        <p>props.count: {count}</p>
        <button onClick={() => this.setState({msg: msg + '-'})}>更新msg</button>
      </div>
    )
  }
}
